﻿#nullable enable

using System;

namespace PHMEE.EnergyEfficiency;

public enum SyncDataType
{
    LogAbstract = 1,
    BunkerReport = 2
}

public static class SyncDataTypeUtils
{
    public static SyncDataType GetSyncDataType(Type type)
    {
        return type.Name switch
        {
            "LogAbstract" => SyncDataType.LogAbstract,
            "BunkerReport" => SyncDataType.BunkerReport,
            _ => throw new NotSupportedException($"Type {type.Name} 不受支持.")
        };
    }
}
